import request from '@/config/axios'

// 用户建议 VO
export interface SuggestVO {
  id: number // 主键
  userId: number // 用户id
  content: string // 建议内容
  images: string // 多图
  supplyTypeId: number // 酒类id
  supplyTypeName: string //酒类名称
}

// 用户建议 API
export const SuggestApi = {
  // 查询用户建议分页
  getSuggestPage: async (params: any) => {
    return await request.get({ url: `/wine/suggest/page`, params })
  },

  // 查询用户建议详情
  getSuggest: async (id: number) => {
    return await request.get({ url: `/wine/suggest/get?id=` + id })
  },

  // 新增用户建议
  createSuggest: async (data: SuggestVO) => {
    return await request.post({ url: `/wine/suggest/create`, data })
  },

  // 修改用户建议
  updateSuggest: async (data: SuggestVO) => {
    return await request.put({ url: `/wine/suggest/update`, data })
  },

  // 删除用户建议
  deleteSuggest: async (id: number) => {
    return await request.delete({ url: `/wine/suggest/delete?id=` + id })
  },

  // 导出用户建议 Excel
  exportSuggest: async (params) => {
    return await request.download({ url: `/wine/suggest/export-excel`, params })
  }
}
